This chapter explains how the Display Manager allows users to dynamically change the arrangement and display modes of the monitors attached to their computers. For example, users can move their displays, add or remove displays, switch displays to higher or lower screen resolutions, and move the menu bar from one display to another--all without restarting their computers. When the user changes the display environment (as when disconnecting a display, for example), the Display Manager further assists the user by repositioning standard windows so that the user can find them in the new display environment.
This chapter helps you determine whether your application must move its own windows instead of relying on the Display Manager to move them. For example, if your application implements a tool palette that lacks a title bar, and the user disconnects the monitor that displays the tool palette, your application must move your tool palette to the main screen where the user can find it. Because the Display Manager never resizes windows, this chapter helps you determine whether to resize your application's windows after a display configuration change.
The Display Manager is available on all Power Macintosh computers and on color-capable Macintosh computers running system software version 7.5 and later. Applications that use only the standard window definition functions provided by the Window Manager generally do not need to use the Display Manager.
Users indirectly inform the Display Manager of changes they wish to make to their display environment by using the Monitors control panel or by adding and removing additional displays. The Monitors control panel in turn calls the Display Manager to change the display environment. The Display Manager sends an Apple event--the Display Notice event--to notify applications that it changed the display environment. In addition, the Display Manager generates an update event to notify all current applications to update their windows.
The Display Manager provides your application with functions that obtain
GDevice
structures for the video devices controlling the displays connected to the user's computer system. When repositioning a window, for example, your application can use the
GDevice
structures stored in the device list to determine which video device supports the largest display area or the greatest pixel depth.
This chapter explains the capabilities of the Display Manager and describes its default behavior when repositioning windows. This chapter helps determine whether your application needs to perform its own window positioning or sizing. If your application needs to perform its own window management in a changing environment, the next chapter, "Using the Display Manager," discusses how your application can determine if the user changed the display environment and how to manage its windows accordingly.